import 'package:flutter/material.dart';
import 'package:drm/gdfk/azd/azd.dart';
import 'package:drm/gdfk/wxd/wxd_page.dart';

class GdfkHomePage extends StatelessWidget {
  final tabTitls = ['安装单', '维修单', '配件更换'];

  @override
  Widget build(BuildContext context) {
    return DefaultTabController(
        length: tabTitls.length,
        child: Scaffold(
          appBar: AppBar(
            title: Text('工单反馈'),
            elevation: 0,
            centerTitle: true,
          ),
          body: Column(
            children: <Widget>[
              Container(child: TabBar(
                  tabs: tabTitls.map((title) {
                    return Tab(
                      text: title,
                    );
                  }).toList()),
              color: Theme.of(context).primaryColor,)
              ,
              Expanded(
                child: TabBarView(children: [
                  AzdPage(
                    0,
                    title: tabTitls[0],
                  ),
                  WxdPage(
                    1,
                    title: tabTitls[1],
                  ),
                  AzdPage(
                    2,
                    title: tabTitls[2],
                  ),
                ]),
              )
            ],
          ),
        ));
  }
}
